﻿<UserControl x:Class="ChumChase.Views.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:s="clr-namespace:ChumChase.Controls.Semantic"
             Action.Target="{Binding}">
    <DockPanel>
        <TextBlock Text="Settings"
                   DockPanel.Dock="Top" />

        <s:ButtonBar DockPanel.Dock="Bottom">
            <Button Content="Apply"
                    Message.Attach="ApplySettings" />
            <Button Content="Close"
                    Message.Attach="ClosePresenter($dataContext)" />
        </s:ButtonBar>

        <TabControl ItemsSource="{Binding Catalog.Providers}"
                    SelectedItem="{Binding CurrentProvider}"
                    DisplayMemberPath="DisplayName">
            <TabControl.ContentTemplate>
                <DataTemplate>
                    <ContentControl Content="{Binding Settings}" />
                </DataTemplate>
            </TabControl.ContentTemplate>
        </TabControl>

    </DockPanel>
</UserControl>
